import React from 'react'
import { withRouter, NavLink } from 'react-router-dom'
import { observer, inject } from 'mobx-react'
@withRouter
@inject('three')
@observer
class App extends React.Component {
    componentDidMount() {
        // console.log(this.props.first.token[0].id)
        console.log(
            '-.- QAQ'
        )
    }
    hdFn(e,text){
        const {setName} = this.props.three
        // console.log(text)
        setName(text)
        console.log(this.props.three.name)
        // console.log()
    }
    render() {
        const {name} = this.props.three
        return (
            <React.Fragment>
                <div>
                <br />
                <NavLink to='/starts' >XXXX1</NavLink>
                <br />
                    <NavLink to='/Sx' >xxxx2</NavLink>
                    123456
                    {
                        name
                    }
                    <input type="button" value='更换名字' onClick={(e)=>this.hdFn(e,'ajax值')} />
                </div>
            </React.Fragment>
        )
    }
}
export default App